import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { LayoutComponent } from '../layout/layout.component';
import { ClientComponent } from './client.component';

import { AuthGuard } from '../auth-guard';
import { AuthService } from '../scheme/auth.service';

const clientRoutes: Routes = [
	{
		path: 'admin',
		component: LayoutComponent,
		canActivateChild: [AuthGuard],
		children: [
			{
				path: 'client',
				component: ClientComponent
			}
		]
	}
];

export const clientRoutingProviders: any[] = [
    AuthGuard,
    AuthService
];

export const clientRouting: ModuleWithProviders = RouterModule.forChild(clientRoutes);